package com.ztgf.sys.service;

import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.BeanUtils;
import javax.annotation.Resource;
import com.ztgf.sys.common.config.YmlConfig;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.ztgf.sys.mapper.SysPayChannelMapper;
import com.ztgf.sys.models.service.ISysPayChannelService;
import com.ztgf.sys.models.bo.SysPayChannelSaveBO;
import com.ztgf.sys.models.dto.SysPayChannelDTO;

/**
 * 支付通道表控制器
 *
 * @author mxli
 * @Date 2020-07-10 14:18:23
 */
@DubboService
public class SysPayChannelServiceImpl extends ServiceImpl<SysPayChannelMapper, SysPayChannelDTO> implements ISysPayChannelService{

    @Resource
    private YmlConfig ymlConfig;

    @Override
    public boolean add(SysPayChannelSaveBO saveBO) {
        SysPayChannelDTO dto = new SysPayChannelDTO();
        BeanUtils.copyProperties(saveBO,dto);
        Long id = ymlConfig.getPkId();
        dto.setId(id);
        return this.insert(dto);
    }
}
